﻿<%<hi:common_new_header runat="server" skinname="/ascx/JsNewTags/Skin-Common_New_Header.ascx" />%>
<link href="http://res.juseshop.com/templates/master/jusekeji/style/style.css" rel="stylesheet" />

<div class="main">
<script src="http://res.juseshop.com/utility/validate/pagevalidator.js" type="text/javascript"></script>
<div class="re_friend_tab">
	 
	  <h2 class="re_productreviews_h2">商品评论</h2>
<div class="re_blogit_pro_t"><strong>当前评论商品</strong><span class="color_A30">【<%<Hi:ProductDetailsLink ID="ProductDetailsLink1" runat="server"></Hi:ProductDetailsLink> %>】</span></div>

<%<Hi:SmallStatusMessage id="Status" runat="server" Visible="False" />%>
<form runat="server">
<table width="100%" border="0" cellspacing="0" class="re_productreviews_tabc">
        <tr>
          <td width="12%" align="right" valign="top">昵称：</td>
          <td colspan="2">
            <%<asp:TextBox id="txtUserName" CssClass="inpnt" runat="Server" Width="200" ></asp:TextBox> %><span id="txtUserNameTip" runat="server"></span>
          </td>
        </tr>
        <tr>
          <td align="right" valign="top">电子邮箱：</td>
          <td colspan="2"><%<asp:TextBox id="txtEmail" CssClass="inpnt" runat="Server" Width="200" ></asp:TextBox> %>
           <span id="txtEmailTip" runat="server"></span></td>
        </tr>
        <tr>
          <td align="right" valign="top">评价：</td>
          <td colspan="2">
              <input type="radio" name="wnxd_evaluate" value="0" checked="checked" style="margin:0 5px;" />好
              <input type="radio" name="wnxd_evaluate" value="1" style="margin:0 5px;" />中
              <input type="radio" name="wnxd_evaluate" value="2" style="margin:0 5px;" />差
          </td>
        </tr>
        <tr>
          <td align="right" valign="top">内容：</td>
          <td colspan="2" class="pinginnon"><%<asp:TextBox id="txtContent" Height="100" Width="430" TextMode="MultiLine" runat="Server"></asp:TextBox> %><span id="txtContentTip" runat="server"></span></td>
        </tr>
        <tr>
<table  width="100%"  border="0" cellpadding="0" cellspacing="0"  >
            <tr>
               <td height="40" width="40" align="center"  >&nbsp;</td>
               <td   valign="middle" >
               
                <ul style="margin-top:10px; height:auto;overflow:hidden;">
                    <li style="float:left; margin-left:5px; "><span id="spReviewUserName" runat="server">用户名：<input type=text id="txtReviewUserName" runat="server" class="input2" style="width:80px;" /></span></li>
                    <li style="float:left; margin-left:5px;"><span id="spReviewPsw" runat="server">密码：<input type=password id="txtReviewPsw" runat="server" class="input2" style="width:70px;"/></span></li>
                    <li style="float:left; margin-left:5px;">
                        
                        <span>
                            <span style=" display:block; padding-top:4px; width:70px; text-align:right; float:left;">验证码：</span>
                             <input type=text id="txtReviewCode" runat="server" style="width:50px; float:left;" class="input2" />&nbsp;<img id="img_txtNumber" src="" alt="" />
                            <a href="javascript:refreshReviewCode();" ><img id="imgReviewVerifyCode" src='' style="border-style:none;" alt=""/></a>
                            <script language="javascript" type="text/javascript">
                                document.getElementById('imgReviewVerifyCode').src = applicationPath + "/VerifyCodeImage.aspx";
                                function refreshReviewCode() {
                                    var img = document.getElementById("imgReviewVerifyCode");

                                    if (img != null) {
                                        var currentDate = new Date();
                                        img.src = applicationPath + "/VerifyCodeImage.aspx?t=" + currentDate.getTime();
                                    }
                                }
                            </script>
                        </span>
                    
                    </li>
                    <li style="float:left;margin-left:25px; width:850px; margin-top:15px;">
                        <%<asp:Button runat="server" ID="btnRefer" CssClass="btn_shortsub" OnClientClick="return PageIsValid();" ValidationGroup="valsIntroduced" Text="评论" />%>
                    </li>
                    <li style="float:left;margin-left:5px;"><span id="spReviewReg" runat="server"  style=" display:block; padding-top:5px; float:left;"><Hi:SiteUrl UrlName="register" runat="server">注册</Hi:SiteUrl></span></li>
                </ul>
                                
               </td>              
            </tr>
          </table>
        </tr>
        <tr>
          
        </tr>
      </table>
</form> 
    
 </div>
	

<script type="text/javascript" language="javascript">
        function InitValidators() {
            initValid(new InputValidator('ProductReviews_txtUserName', 1, 30, false, null, '请输入您的名字，不能为空长度限制在1-30之间'))
            initValid(new InputValidator('ProductReviews_txtEmail', 1, 256, false,'[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\.[\\w-]+)+','请输入正确的邮箱，不能为空长度限制在1-256之间'))
            initValid(new InputValidator('ProductReviews_txtContent', 1, 300, false, null, '请输入评论内容，不能为空长度限制在1-300之间'))
        }
        $(document).ready(function () {
            InitValidators();
            $("#img_txtNumber").hide();
            $("#ProductReviews_txtReviewCode").keyup(function () {
                var value = $(this).val();
                if (value.length < 4) {
                    $("#img_txtNumber").hide();
                    temp = "";
                }
                else if (value.length == 4) {
                    if (temp != value) {
                        $("#img_txtNumber").show();
                        $.ajax({
                            url: "ProductReviews.aspx",
                            type: 'post', dataType: 'json', timeout: 10000,
                            data: {
                                isCallback: "true",
                                code: $("#ProductReviews_txtReviewCode").val()
                            },
                            async: false,
                            success: function (resultData) {
                                var flag = resultData.flag;
                                if (flag == "1") {
                                    $("#img_txtNumber").attr("src", "/images/true.gif");
                                }
                                else if (flag == "0") {
                                    $("#img_txtNumber").attr("src", "/images/false.gif");
                                }
                            }
                        });
                    }
                    temp = value;
                }
            });
         });
    </script>
</div>
<%<hi:common_new_footer runat="server" />%>

